import store from '@/store'
export const permission = {
    install: (app) => {
        app.directive('btnkey', {
            mounted(el, binding) {
                let buttonKey = binding.value
                let permissionData = store.state.Admin.userData.perms || [];
                if (permissionData.indexOf(buttonKey) == -1) {
                    el.remove()  //删除按钮
                }
            }
        })
    }
}